# pip install ddddocr

#
# # 下载一些验证码
# url = 'https://www.shajpjdzx.org.cn/captcha.php'
# import requests
# for i in range(10):
#     with open(f'code\captcha_{i+1}.jpg', 'wb') as f:
#         f.write(requests.get(url).content)
#
#
# exit()
import ddddocr
ocr = ddddocr.DdddOcr()
with open('.\code\captcha_1.jpg','rb') as f:
    img = f.read()

result = ocr.classification(img)
print('验证码的结果为：---->  ',result)